﻿using dotHTML.HTML;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Text;
using System.Drawing;
#pragma warning disable 0618
namespace TestdotHTML
{
    
    
    /// <summary>
    ///This is a test class for HrTest and is intended
    ///to contain all HrTest Unit Tests
    ///</summary>
    [TestClass()]
    public class HrTest {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext {
            get {
                return testContextInstance;
            }
            set {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Hr Constructor
        ///</summary>
        [TestMethod()]
        public void HrConstructorTest() {
            Hr target = new Hr();
            Assert.AreEqual("<hr/>", target.ToString());
        }

        /// <summary>
        ///A test for Align
        ///</summary>
        [TestMethod()]
        public void AlignTest() {
            Hr target = new Hr();
            Nullable<Hr.Alignment> expected = Hr.Alignment.Center;
            Nullable<Hr.Alignment> actual;
            target.Align = expected;
            actual = target.Align;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Color
        ///</summary>
        [TestMethod()]
        public void ColorTest() {
            Hr target = new Hr();
            Nullable<Color> expected = Color.Red;
            Nullable<Color> actual;
            target.Color = expected;
            actual = target.Color;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for NoShade
        ///</summary>
        [TestMethod()]
        public void NoShadeTest() {
            Hr target = new Hr();
            bool expected = false;
            bool actual;
            target.NoShade = expected;
            actual = target.NoShade;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Size
        ///</summary>
        [TestMethod()]
        public void SizeTest() {
            Hr target = new Hr();
            Nullable<int> expected = 1;
            Nullable<int> actual;
            target.Size = expected;
            actual = target.Size;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Width
        ///</summary>
        [TestMethod()]
        public void WidthTest() {
            Hr target = new Hr();
            string expected = string.Empty;
            string actual;
            target.Width = expected;
            actual = target.Width;
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void ToStringTest() {
            Hr h = new Hr();
            h.Align = Hr.Alignment.Center;
            h.Color = Color.Red;
            h.NoShade = true;
            h.Size = 1;
            h.Width = "2";
            Assert.AreEqual("<hr align=\"center\" " +
                "color=\"#FF0000\" " +
                "noshade=\"noshade\" " +
                "size=\"1\" " +
                "width=\"2\"/>", h.ToString());
        }
    }
}
